home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / program / vbcomdem.zip / ABOUTDLG.TXT next >
Text File  |  1991-07-11  |  2KB  |  75 lines

  1. Sub Command1_Click ()
  2.     Unload AboutDlg
  3. End Sub
  4.  
  5. Sub Form_Load ()
  6.  
  7.     Remove_Items_From_SysMenu AboutDlg
  8.  
  9.     Initialize
  10.  
  11.     Height = Command1.top + (Command1.Height * 1.5) + (Height - ScaleHeight)
  12.  
  13.     CenterDialog AboutDlg
  14.  
  15. End Sub
  16.  
  17.  
  18. Sub Initialize ()
  19.  
  20.     Dim NewLeft     As Integer
  21.     Dim NewTop      As Integer
  22.     Dim Counter     As Integer
  23.     Dim MaxWidth    As Integer
  24.  
  25.     Static Text$(0 To 5)
  26.     Static Size(0 To 5) As Integer
  27.  
  28.     Text$(0) = "Communication Demo"
  29.     Text$(1) = "written in"
  30.     Text$(2) = "Microsoft Visual Basic Programming System"
  31.     Text$(3) = "Version 1.00"
  32.     Text$(4) = "for"
  33.     Text$(5) = "Microsoft Windows 3.00"
  34.  
  35.     Size(0) = 24
  36.     Size(1) = 12
  37.     Size(2) = 12
  38.     Size(3) = 12
  39.     Size(4) = 12
  40.     Size(5) = 12
  41.  
  42.     CurrentY = Command1.Height / 2
  43.     MaxWidth = TextWidth(Caption)
  44.  
  45.     For Counter = 0 To 5
  46.         FontSize = Size(Counter)
  47.         
  48.         WorkWidth = TextWidth(Text$(Counter))
  49.         If WorkWidth > MaxWidth Then MaxWidth = WorkWidth
  50.  
  51.         CurrentX = (ScaleWidth - WorkWidth) / 2
  52.         
  53.         Print Text$(Counter);
  54.         CurrentY = CurrentY + TextHeight(Text$(Counter))
  55.     Next Counter
  56.  
  57.     Line ((ScaleWidth - MaxWidth) / 2, CurrentY)-(((ScaleWidth - MaxWidth) / 2) + MaxWidth, CurrentY + 30), QBColor(0), BF
  58.     
  59.     width = MaxWidth + Command1.width
  60.  
  61.     NewLeft = (ScaleWidth - Command1.width) / 2
  62.     NewTop = CurrentY + Command1.Height
  63.  
  64.     Command1.Move NewLeft, NewTop
  65.  
  66. End Sub
  67.  
  68. Sub Form_Paint ()
  69.     
  70.     Initialize
  71.     UpdateCaption " DIALOG: " + Caption, 0
  72.  
  73. End Sub
  74.  
  75.